package com.yycx.module.bus.provider.handler.cbreturn;

import com.yycx.common.base.entity.EntityMap;
import com.yycx.common.mybatis.interceptor.DeleteInterceptor;
import com.yycx.common.mybatis.query.CriteriaDelete;
import com.yycx.module.bus.provider.service.BusOrderDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * 退保证金删除扩展
 *
 * @author zyf
 */
@Component("cbReturnPaymentDeleteHandler")
public class CbReturnPaymentDeleteHandler implements DeleteInterceptor {



    @Autowired
    private BusOrderDetailsService orderDetailsService;

    @Override
    public void prepare(CriteriaDelete criteriaDelete, EntityMap entityMap) {

    }

    @Override
    public void complete(CriteriaDelete cq, EntityMap params) {
        Serializable paymentId = cq.getIdValue();
        orderDetailsService.clearTbzj(paymentId);
    }
}
